import { Injectable, Injector } from '@angular/core';
import { RyBaseServiceService } from '../../../../common/RyBaseService.service';
import { environment } from '../../../../../environments/environment';

@Injectable({
    providedIn: 'root'
})
export class RoleService extends RyBaseServiceService{
    base = '/system/role';
    constructor(private _injector: Injector,) {
        super(_injector);
        super.setBase(this.base);
    }

    getDeptTree(id: any) {
        return this._http.get<any>(environment.baseUrl+this.base+'/deptTree/'+id);
    }

    dataScope(data: any) {
        return this._http.put<any>(environment.baseUrl+this.base+'/dataScope',data);
    }

    allocatedList(params:any){
        const options = {
            params
        }
        return this._http.get<any>(environment.baseUrl+this.base+'/authUser/allocatedList',options);
    }
    unallocatedList(params:any){
        const options = {
            params
        }
        return this._http.get<any>(environment.baseUrl+this.base+'/authUser/unallocatedList',options);
    }

}
